import mockAjax from './mockAjax.ts'
interface SwipersList{
    id:1,
    picUrl:string
} 

interface NavList{
    picUrl:string,
    text:string
}
interface SaleList{
    categoryName:string,
    showPicUrl:string
}
interface ItemList{
    id?:number,
    listPicUrl:string,
    name:string,
    retailPrice:number,
    counterPrice:number,
    content:string,
    topLogo?:string,
    preLogo:string,
}
export type SwipersData =SwipersList[]
// export type Titlle = string[]
export type NavListData = NavList[]
export type SaleListData =SaleList[]
export type ItemListData = ItemList[]

export interface HomeListData{
    swipersData:SwipersData
    titlle:string
    navList:NavListData
    saleList:SaleListData
    itemList:ItemListData
}

interface HomeData {
    data:HomeListData
}

export function getHomeList(){
    return mockAjax.get<any,HomeData>(`/getHomeList`)
}